<% define_content :link do -%>
  <%= polymorphic_url([asset.context, asset]) %>
<% end -%>
<%= t('subject', 'Canvas Alert - Event: %{event_title}, %{course_name}', :event_title => asset.title, :course_name => asset.context.name) %>

<% if !asset.start_at && !asset.end_at -%>
{{#t}}No Time Set{{/t}}
<% elsif (asset.start_at == asset.end_at || !asset.end_at) -%>
<%= datetime_string(force_zone(asset.start_at)) %>
<% else -%>
<%= t('from_to_time', 'from %{start_date_time} to %{end_date_time}', :start_date_time => datetime_string(force_zone(asset.start_at)), :end_date_time => datetime_string(force_zone(asset.end_at))) %>
<% end -%>
